package com.ecnu.sei.app.teacher;

import java.util.Set;

import com.ecnu.sei.app.course.AbstractCourse;
import com.ecnu.sei.app.resources.Time;

/*
 *  Official proctor rules:
 *  1. ONLY proctor his/her own courses
 */

public class Official extends ProctorOwnCourseTeacher {
  
  public Official(String id, String name) {
    super(id, name);
  }
  
  public Official(String id, String name, Set<Time> leaves) {
    super(id, name, leaves); 
  }
  
  public boolean isAvailableForPatrol(AbstractCourse course) {
    Time time = course.getCourseInfo().getExamInfo().getTime();
    if (timeTable.contains(time)) {
     return false;
    } else {
      return true;
    }
  }

  @Override
  public String toString() {
    return "Official [name=" + name + "]";
  }

  
  
  
  
}
